/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.wlyy.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.yihu.wlyy.entity.Medicines;

public interface MedicinesDao extends PagingAndSortingRepository<Medicines, Long>, JpaSpecificationExecutor<Medicines> {

	@Query("select a from Medicines a where a.type = ?1 and a.del = '1'")
	List<Medicines> findAll(int type);

}
